#include <iostream>
#include <iomanip>
#include <cmath>
#include "Watch.h"
#include "Fakultet.h"
#include <chrono>


using namespace std;
using namespace Course;

#pragma optimize("",off)

int main()
{


	Fakultet f;
	Watch w;
	Course ::microseconds t0, t1,  t2;
	long nLoop=1000000;
	long n;
	double x;
	for (n=10; n<300; n=n+10)
	{
		w.restart();
		for (int i=0; i< nLoop; i++) { ; }
		t0=w.elapsedUs();

		w.restart();
		for (int i=0; i<nLoop; i++) 
		{ 
			x=f.RFac1(5);
		}
		t1=w.elapsedUs();
		w.restart();
		for (int i = 0; i < nLoop; i++)
		{
			x=f.RFac2(5);
		}
		t2=w.elapsedUs();
		cout << setw(3) << n << ": " << setw(15) << double(t1.count()-t0.count())/ (double)nLoop;
		cout << setw(15) << (t1.count()-t0.count())/double(nLoop) ;
		cout<<setw(15) << (t2.count()-t0.count())/double(nLoop) << endl;


		/*cout << "5!= " << f.RFac1(5) <<endl;
		cout << "5!= " << f.RFac2(5) <<endl;*/
	}
		system("pause");
		return 0;
	}

